diff options
Diffstat (limited to 'src/routes/(app)/[username]')
| -rw-r--r-- | src/routes/(app)/[username]/dashboard/+page.svelte | 4 | ||||
| -rw-r--r-- | src/routes/(app)/[username]/payments/[...page]/+page.svelte | 15 |
2 files changed, 13 insertions, 6 deletions
diff --git a/src/routes/(app)/[username]/dashboard/+page.svelte b/src/routes/(app)/[username]/dashboard/+page.svelte index 262a7348..feb49c65 100644 --- a/src/routes/(app)/[username]/dashboard/+page.svelte +++ b/src/routes/(app)/[username]/dashboard/+page.svelte @@ -7,7 +7,7 @@ import { goto } from '$app/navigation'; import { t } from '$lib/translations'; import { events } from '$lib/store'; - import { v4 } from "uuid"; + import { v4 } from 'uuid'; export let data; $: ({ invoices, requests } = data); @@ -86,7 +86,7 @@ >{$t('user.dashboard.deposit')}</button > </a> - <a href={`/send/pot/${v4()}`}> + <a href={`/send/pot/${v4()}`}> <button class="rounded-full border py-4 px-5 font-bold hover:opacity-80 w-full" >{$t('user.dashboard.voucher')}</button > diff --git a/src/routes/(app)/[username]/payments/[...page]/+page.svelte b/src/routes/(app)/[username]/payments/[...page]/+page.svelte index f6de4c27..24f7cf6e 100644 --- a/src/routes/(app)/[username]/payments/[...page]/+page.svelte +++ b/src/routes/(app)/[username]/payments/[...page]/+page.svelte @@ -11,6 +11,13 @@ export let data; + const types = { + internal: 'internal', + bitcoin: 'bitcoin', + lightning: 'lightning', + pot: 'pot' + }; + let { start, end, user } = data; let change = ({ target: { value } }) => goto(value); let link = (tx) => { @@ -131,17 +138,17 @@ </div> <div class="flex my-auto"> - {#if tx.redeemcode} - <a href={`/voucher/${tx.redeemcode}`}> + {#if tx.type === types.pot} + <a href={`/pot/${tx.pot}`}> <div class="text-secondary flex"> <div class="my-auto mr-1"> <img src="/icons/logo-symbol.svg" class="w-12 border-4 border-transparent" /> </div> - <div class="my-auto">Voucher</div> + <div class="my-auto">Pot</div> </div> </a> - {:else if tx.with} + {:else if tx.type === types.internal} <a href={`/${tx.with.username}`}> <div class="flex"> <div class="my-auto"> |
